<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:cc="http://java.sun.com/jsf/composite"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<cc:interface>
	<cc:attribute name="managedbean" required="true"></cc:attribute>
	<cc:attribute name="widgetVar" required="true"></cc:attribute>
</cc:interface>
<cc:implementation>
	<p:toolbar id="MyToolBar">
		<p:toolbarGroup align="left">
			<p:commandButton value="Novo" action="#{cc.attrs.managedbean.iniciarCadastrar}"  update="MyToolBar"></p:commandButton>
			<p:commandButton value="Salvar" action="#{cc.attrs.managedbean.inserir}" rendered="#{cc.attrs.managedbean.estadoCadastrando}" update="MyToolBar"></p:commandButton>
			<p:commandButton value="Cancelar" action="#{cc.attrs.managedbean.cancelar}" rendered="#{cc.attrs.managedbean.estadoCadastrando || cc.attrs.managedbean.estadoEditando}" update="MyToolBar"></p:commandButton>
		</p:toolbarGroup>
	</p:toolbar>

</cc:implementation>
</html>